{% extends '@SyliusAdmin/shared/form_theme.html.twig' %}

{% block _sylius_admin_taxon_translations_entry_slug_row %}
    {% set locale = form.parent.vars.name %}

    {{ form_label(form) }}
    <div class="input-group mb-3">
        {{ form_widget(form, sylius_test_form_attribute('slug', locale)) }}
        <button
            class="btn btn-outline-secondary"
            type="button"
            data-action="live#action"
            data-live-action-param="debounce(300)|generateTaxonSlug"
            data-live-locale-code-param="{{ locale }}"
            {{ sylius_test_html_attribute('generate-slug-button', locale) }}
        >
            {{ ux_icon('tabler:wand', {'class': 'icon mx-0'}) }}
        </button>
    </div>
    {{ form_errors(form) }}
{% endblock %}
